package com.hq.bootdemo.controller;

import com.hq.bootdemo.service.CustomerService;
import com.hq.bootdemo.util.JSONUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/customer")
public class CustomerController {
    @Resource
    CustomerService customerService;
    @GetMapping("selectAll")
    public String selectAll(){
        return JSONUtil.getJson(customerService.selectAll());
    }
}
